package com.wnxy.eleba.entity;

import java.math.BigDecimal;

public class Shopcart {
    /**
    * 编号
    */
    private Integer id;

    /**
    * 菜品编号
    */
    private Integer dishesid;

    /**
    * 用户编号
    */
    private Integer uid;

    /**
    * 菜品名称
    */
    private String dishesName;

    /**
    * 菜品图片
    */
    private String dishesImage;

    /**
    * 菜品价格
    */
    private BigDecimal dishesPrice;

    /**
    * 菜品数量
    */
    private Integer dishesNum;

    /**
    * 菜品小计
    */
    private BigDecimal dishesTotal;

    /**
    * 是否添加进订单（0未添加，1已添加）
    */
    private Integer isInOrder;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getDishesid() {
        return dishesid;
    }

    public void setDishesid(Integer dishesid) {
        this.dishesid = dishesid;
    }

    public Integer getUid() {
        return uid;
    }

    public void setUid(Integer uid) {
        this.uid = uid;
    }

    public String getDishesName() {
        return dishesName;
    }

    public void setDishesName(String dishesName) {
        this.dishesName = dishesName;
    }

    public String getDishesImage() {
        return dishesImage;
    }

    public void setDishesImage(String dishesImage) {
        this.dishesImage = dishesImage;
    }

    public BigDecimal getDishesPrice() {
        return dishesPrice;
    }

    public void setDishesPrice(BigDecimal dishesPrice) {
        this.dishesPrice = dishesPrice;
    }

    public Integer getDishesNum() {
        return dishesNum;
    }

    public void setDishesNum(Integer dishesNum) {
        this.dishesNum = dishesNum;
    }

    public BigDecimal getDishesTotal() {
        return dishesTotal;
    }

    public void setDishesTotal(BigDecimal dishesTotal) {
        this.dishesTotal = dishesTotal;
    }

    public Integer getIsInOrder() {
        return isInOrder;
    }

    public void setIsInOrder(Integer isInOrder) {
        this.isInOrder = isInOrder;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", dishesid=").append(dishesid);
        sb.append(", uid=").append(uid);
        sb.append(", dishesName=").append(dishesName);
        sb.append(", dishesImage=").append(dishesImage);
        sb.append(", dishesPrice=").append(dishesPrice);
        sb.append(", dishesNum=").append(dishesNum);
        sb.append(", dishesTotal=").append(dishesTotal);
        sb.append(", isInOrder=").append(isInOrder);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Shopcart other = (Shopcart) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getDishesid() == null ? other.getDishesid() == null : this.getDishesid().equals(other.getDishesid()))
            && (this.getUid() == null ? other.getUid() == null : this.getUid().equals(other.getUid()))
            && (this.getDishesName() == null ? other.getDishesName() == null : this.getDishesName().equals(other.getDishesName()))
            && (this.getDishesImage() == null ? other.getDishesImage() == null : this.getDishesImage().equals(other.getDishesImage()))
            && (this.getDishesPrice() == null ? other.getDishesPrice() == null : this.getDishesPrice().equals(other.getDishesPrice()))
            && (this.getDishesNum() == null ? other.getDishesNum() == null : this.getDishesNum().equals(other.getDishesNum()))
            && (this.getDishesTotal() == null ? other.getDishesTotal() == null : this.getDishesTotal().equals(other.getDishesTotal()))
            && (this.getIsInOrder() == null ? other.getIsInOrder() == null : this.getIsInOrder().equals(other.getIsInOrder()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getDishesid() == null) ? 0 : getDishesid().hashCode());
        result = prime * result + ((getUid() == null) ? 0 : getUid().hashCode());
        result = prime * result + ((getDishesName() == null) ? 0 : getDishesName().hashCode());
        result = prime * result + ((getDishesImage() == null) ? 0 : getDishesImage().hashCode());
        result = prime * result + ((getDishesPrice() == null) ? 0 : getDishesPrice().hashCode());
        result = prime * result + ((getDishesNum() == null) ? 0 : getDishesNum().hashCode());
        result = prime * result + ((getDishesTotal() == null) ? 0 : getDishesTotal().hashCode());
        result = prime * result + ((getIsInOrder() == null) ? 0 : getIsInOrder().hashCode());
        return result;
    }
}